{if $shape == 0} {assign var=debtorByNature value=$lastDebtVal} {assign var=cerditorByNature value=$lastCreditVal} {assign var=lastid value=0} {foreach $allDailyEntery as $dailyEntery} {if $dailyEntery->id !=""} {assign var=lastid value=$dailyEntery->id} {if $dailyEntery->reverseofid != 0 && $dailyEntery->reverseofid != -10} {else} {/if} {else} {if $dailyEntery->reverseofid != 0} {else} {/if} {/if} {$dailyEntery->dDateTime} {$dailyEntery->entryComment} {$dailyEntery->dComment} {$dailyEntery->id} {if $dailyEntery->type eq 0} {$dailyEntery->value} {$dailyEntery->accountstreeName} {assign var=debtorByNature value=$debtorByNature + $dailyEntery->value} {assign var=cerditorByNature value=$cerditorByNature - $dailyEntery->value} {else} {$dailyEntery->value} {$dailyEntery->accountstreeName} {assign var=debtorByNature value=$debtorByNature - $dailyEntery->value} {assign var=cerditorByNature value=$cerditorByNature + $dailyEntery->value} {/if} {if $entry->itemtype == "0"||$entry->itemtype == "3"}{$debtorByNature}{else}{$cerditorByNature}{/if} {/foreach} {else if $shape == 1} {assign var=debtorTotal value=0} {assign var=cerditorTotal value=0} {assign var=lastid value=0} {for $foo = 0 to $realCount step=2} {if $allDailyEntery[$foo]->accountstreeName =="" && $allDailyEntery[$foo+1]->accountstreeName ==""} {else} {if $allDailyEntery[$foo]->id > 0 && $allDailyEntery[$foo]->id > $lastid} {assign var=lastid value=$allDailyEntery[$foo]->id} {/if} {if $allDailyEntery[$foo+1]->id > 0 && $allDailyEntery[$foo+1]->id > $lastid} {assign var=lastid value=$allDailyEntery[$foo+1]->id} {/if} {$allDailyEntery[$foo]->value} {if $allDailyEntery[$foo]->accountstreeName != ""}الى حــ/ {/if}{$allDailyEntery[$foo]->accountstreeName} {$allDailyEntery[$foo]->dDateTime} {$allDailyEntery[$foo]->id} {$allDailyEntery[$foo+1]->value} {if $allDailyEntery[$foo+1]->accountstreeName != ""}من حــ/ {/if}{$allDailyEntery[$foo+1]->accountstreeName} {$allDailyEntery[$foo+1]->dDateTime} {$allDailyEntery[$foo+1]->id} {assign var=debtorTotal value=$debtorTotal + $allDailyEntery[$foo]->value} {assign var=cerditorTotal value=$cerditorTotal + $allDailyEntery[$foo+1]->value} {/if} {/for} {if $cerditorTotal-$debtorTotal != 0} {if $cerditorTotal-$debtorTotal>0}{$cerditorTotal-$debtorTotal}{/if} {if $cerditorTotal-$debtorTotal>0}رصيد دائن{/if} {if $debtorTotal-$cerditorTotal>0}{$debtorTotal-$cerditorTotal}{/if} {if $debtorTotal-$cerditorTotal>0}رصيد مدين{/if} {/if} {if $cerditorTotal-$debtorTotal>0}{$cerditorTotal}{else}{$debtorTotal}{/if} {if $cerditorTotal-$debtorTotal>0}{$cerditorTotal}{else}{$debtorTotal}{/if} {/if} {if count($allDailyEntery)>0} عـــرض المزيـــد {/if}